/* shell.h */
#ifndef __SHELL_H__
#define __SHELL_H__

#include <stdint.h>
#include <stdbool.h>
#include <string.h>

#define SHELL_MAX_ARGS      (5)
#define CMD_BUF_LEN         (64)

typedef struct sh_cmd *sh_cmd_t;
struct sh_cmd
{
    int (*fun)(int argc, char* argv[]);  /* 函数指针 */
    char       *name;
    char       *help;
};

/*!
 * @brief Shell main loop.
 *
 * @param prompt   a prompt string.
 * @param cmds     shell command array.
 * @param num      number of shell commands
 * 
 */
void shell_loop(char* prompt, sh_cmd_t cmds, uint32_t num);

#endif /* __SHELL_H__ */

